package ro.cityprojects.adminloc.dao;

import org.springframework.stereotype.Repository;
import ro.cityprojects.adminloc.entities.Street;

import java.util.Set;

/**
 * StreetDAO class
 *
 * @author bogdan.solga
 *
 * Date: 14.06.2013, time: 21:18
 */
@Repository
public class StreetDAOImpl extends BaseDAO<Integer, Street> implements StreetDAO {

    @Override
    public void save(Street street) {
        saveEntity(street);
    }

    @Override
    public Street get(Integer id) {
        return get(Street.class, id);
    }

    @Override
    public Set<Street> getAll(String filterName, String filterValue) {
        return getAll(filterName, filterValue, Street.class);
    }

    @Override
    public void update(Street street) {
        updateEntity(street);
    }

    @Override
    public void delete(Integer primaryKey) {
        deleteEntity(Street.class, primaryKey);
    }
}
